package com.yingxin.yx.framework.commons.activiti.enums;

public enum AuditAction {


    APPROVE("A", "同意"),

    FINAL_APPROVE("FA", "同意并结束流程"),

    REJECT("R", "不同意"),

    TRANSFER("T", "转办"),

    CANCEL("C", "取消");


    private String action;

    private String actionName;

    AuditAction(String action, String actionName) {
        this.action = action;
        this.actionName = actionName;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getActionName() {
        return actionName;
    }

    public void setActionName(String actionName) {
        this.actionName = actionName;
    }


    public static AuditAction getEnum(String action) {
        for (AuditAction i : AuditAction.values()) {
            if (i.getAction().equals(action)) {
                return i;
            }
        }
        return null;
    }
}
